DROP TABLE CRST_PO_LINES_ALL;

CREATE TABLE CRST_PO_LINES_ALL
(
  PO_LINE_ID                   NUMBER           NOT NULL,
  LAST_UPDATE_DATE             DATE             NOT NULL,
  LAST_UPDATED_BY              NUMBER           NOT NULL,
  PO_HEADER_ID                 NUMBER           NOT NULL,
  LINE_TYPE_ID                 NUMBER           NOT NULL,
  LINE_NUM                     NUMBER           NOT NULL,
  LAST_UPDATE_LOGIN            NUMBER,
  CREATION_DATE                DATE,
  CREATED_BY                   NUMBER,
  ITEM_ID                      NUMBER,
  ITEM_REVISION                VARCHAR2(3 BYTE),
  CATEGORY_ID                  NUMBER,
  ITEM_DESCRIPTION             VARCHAR2(240 BYTE),
  UNIT_MEAS_LOOKUP_CODE        VARCHAR2(25 BYTE),
  QUANTITY_COMMITTED           NUMBER,
  COMMITTED_AMOUNT             NUMBER,
  ALLOW_PRICE_OVERRIDE_FLAG    VARCHAR2(1 BYTE),
  NOT_TO_EXCEED_PRICE          NUMBER,
  LIST_PRICE_PER_UNIT          NUMBER,
  UNIT_PRICE                   NUMBER,
  QUANTITY                     NUMBER,
  UN_NUMBER_ID                 NUMBER,
  HAZARD_CLASS_ID              NUMBER,
  NOTE_TO_VENDOR               VARCHAR2(480 BYTE),
  FROM_HEADER_ID               NUMBER,
  FROM_LINE_ID                 NUMBER,
  MIN_ORDER_QUANTITY           NUMBER,
  MAX_ORDER_QUANTITY           NUMBER,
  QTY_RCV_TOLERANCE            NUMBER,
  OVER_TOLERANCE_ERROR_FLAG    VARCHAR2(25 BYTE),
  MARKET_PRICE                 NUMBER,
  UNORDERED_FLAG               VARCHAR2(1 BYTE),
  CLOSED_FLAG                  VARCHAR2(1 BYTE),
  USER_HOLD_FLAG               VARCHAR2(1 BYTE),
  CANCEL_FLAG                  VARCHAR2(1 BYTE),
  CANCELLED_BY                 NUMBER(9),
  CANCEL_DATE                  DATE,
  CANCEL_REASON                VARCHAR2(240 BYTE),
  FIRM_STATUS_LOOKUP_CODE      VARCHAR2(30 BYTE),
  FIRM_DATE                    DATE,
  VENDOR_PRODUCT_NUM           VARCHAR2(25 BYTE),
  CONTRACT_NUM                 VARCHAR2(25 BYTE),
  TAXABLE_FLAG                 VARCHAR2(1 BYTE),
  TAX_NAME                     VARCHAR2(15 BYTE),
  TYPE_1099                    VARCHAR2(10 BYTE),
  CAPITAL_EXPENSE_FLAG         VARCHAR2(1 BYTE),
  NEGOTIATED_BY_PREPARER_FLAG  VARCHAR2(1 BYTE),
  ATTRIBUTE_CATEGORY           VARCHAR2(30 BYTE),
  ATTRIBUTE1                   VARCHAR2(150 BYTE),
  ATTRIBUTE2                   VARCHAR2(150 BYTE),
  ATTRIBUTE3                   VARCHAR2(150 BYTE),
  ATTRIBUTE4                   VARCHAR2(150 BYTE),
  ATTRIBUTE5                   VARCHAR2(150 BYTE),
  ATTRIBUTE6                   VARCHAR2(150 BYTE),
  ATTRIBUTE7                   VARCHAR2(150 BYTE),
  ATTRIBUTE8                   VARCHAR2(150 BYTE),
  ATTRIBUTE9                   VARCHAR2(150 BYTE),
  ATTRIBUTE10                  VARCHAR2(150 BYTE),
  REFERENCE_NUM                VARCHAR2(25 BYTE),
  ATTRIBUTE11                  VARCHAR2(150 BYTE),
  ATTRIBUTE12                  VARCHAR2(150 BYTE),
  ATTRIBUTE13                  VARCHAR2(150 BYTE),
  ATTRIBUTE14                  VARCHAR2(150 BYTE),
  ATTRIBUTE15                  VARCHAR2(150 BYTE),
  MIN_RELEASE_AMOUNT           NUMBER,
  PRICE_TYPE_LOOKUP_CODE       VARCHAR2(25 BYTE),
  CLOSED_CODE                  VARCHAR2(25 BYTE),
  PRICE_BREAK_LOOKUP_CODE      VARCHAR2(25 BYTE),
  USSGL_TRANSACTION_CODE       VARCHAR2(30 BYTE),
  GOVERNMENT_CONTEXT           VARCHAR2(30 BYTE),
  REQUEST_ID                   NUMBER,
  PROGRAM_APPLICATION_ID       NUMBER,
  PROGRAM_ID                   NUMBER,
  PROGRAM_UPDATE_DATE          DATE,
  CLOSED_DATE                  DATE,
  CLOSED_REASON                VARCHAR2(240 BYTE),
  CLOSED_BY                    NUMBER(9),
  TRANSACTION_REASON_CODE      VARCHAR2(25 BYTE),
  ORG_ID                       NUMBER,
  QC_GRADE                     VARCHAR2(25 BYTE),
  BASE_UOM                     VARCHAR2(25 BYTE),
  BASE_QTY                     NUMBER,
  SECONDARY_UOM                VARCHAR2(25 BYTE),
  SECONDARY_QTY                NUMBER,
  GLOBAL_ATTRIBUTE_CATEGORY    VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE1            VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE2            VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE3            VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE4            VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE5            VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE6            VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE7            VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE8            VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE9            VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE10           VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE11           VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE12           VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE13           VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE14           VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE15           VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE16           VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE17           VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE18           VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE19           VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE20           VARCHAR2(150 BYTE),
  LINE_REFERENCE_NUM           VARCHAR2(25 BYTE),
  PROJECT_ID                   NUMBER,
  TASK_ID                      NUMBER,
  EXPIRATION_DATE              DATE,
  TAX_CODE_ID                  NUMBER,
  OKE_CONTRACT_HEADER_ID       NUMBER,
  OKE_CONTRACT_VERSION_ID      NUMBER,
  SECONDARY_QUANTITY           NUMBER,
  SECONDARY_UNIT_OF_MEASURE    VARCHAR2(25 BYTE),
  PREFERRED_GRADE              VARCHAR2(25 BYTE),
  AUCTION_HEADER_ID            NUMBER,
  AUCTION_DISPLAY_NUMBER       VARCHAR2(40 BYTE),
  AUCTION_LINE_NUMBER          NUMBER,
  BID_NUMBER                   NUMBER,
  BID_LINE_NUMBER              NUMBER,
  RETROACTIVE_DATE             DATE,
  PO_LINE_ID_N                 NUMBER
);
